package Bk.basic;

public class J17_Product implements J17_ProductService {

	private J17_ProductVO[] pdata = new J17_ProductVO[10];
	private int pos = -1;	// 1
	
	
	
	@Override
	public boolean addProduct(J17_ProductVO p) {
		pdata[++pos] = p;		//2
		return true;
	}

	@Override
	public String readProduct() {
		String result = "";			//3
		J17_ProductVO pvo;
		for( int i =0; i <= pos; ++i ) {		
			pvo = pdata[ i ];
			result += pvo.toString() + "\n";
		}
		return result;
	}
	
	
	
}
